VB.NET - Send [Delegate] through the classes to set AddressOf
Posted
by sv88erik
on Stack Overflow
See other posts from Stack Overflow
or by sv88erik
Published on 2010-01-11T18:06:40Z
Indexed on
2010/04/20
4:03 UTC
Read the original article
Hit count: 418
How can I put AddressOf, from another class?
I get this error 'AddressOf' operand must be the name of a method (without parentheses). "
Is there an Eval () function in VB.NET? Or how does one do this?
Public Shared Property e As UserControl
Public Shared Sub SetButton(ByVal button As String, ByVal Objekt As [Delegate])
Dim errorbuttom1 As Button = e.FindName("errorButton1")
AddHandler errorbuttom1.Click, AddressOf Objekt
End Sub
© Stack Overflow or respective owner